package com.alibaba.nacos.client.naming.event;

import com.alibaba.nacos.api.naming.pojo.Instance;
import com.alibaba.nacos.common.notify.Event;

import java.util.List;

/**
 * @ClassName InstancesChangeEvent
 * @Description: TODO
 * @Author linjiahao
 * @Date 2023/2/1
 **/
public class InstancesChangeEvent extends Event {
    private static final long serialVersionUID = -8823087028212249603L;
    private final String serviceName;
    private final String groupName;
    private final String clusters;
    private final List<Instance> hosts;
    private Integer eventType;

    public InstancesChangeEvent(String serviceName, String groupName, String clusters, List<Instance> hosts,Integer eventType) {
        this.serviceName = serviceName;
        this.groupName = groupName;
        this.clusters = clusters;
        this.hosts = hosts;
        this.eventType = eventType;
    }

    public String getServiceName() {
        return this.serviceName;
    }

    public String getGroupName() {
        return this.groupName;
    }

    public String getClusters() {
        return this.clusters;
    }

    public List<Instance> getHosts() {
        return this.hosts;
    }

    public Integer getEventType() {
        return eventType;
    }
}
